﻿using System;
using System.Collections.Generic;

namespace BubbleSorter
{
    class Program
    {
        static void Main(string[] args)
        {
            List<EmployeeExe> employees1 = new List<EmployeeExe>();
            employees1.Add(new EmployeeExe("Bugs Bunny", 20000, 50));
            employees1.Add(new EmployeeExe("Elmer Fudd", 10000, 22));
            employees1.Add(new EmployeeExe("Daffy Duck", 25000, 20));
            employees1.Add(new EmployeeExe("Wile Coyote", 1000000.38m, 30));
            employees1.Add(new EmployeeExe("Foghorn Leghorn", 23000, 50));
            employees1.Add(new EmployeeExe("RoadRunner", 50000, 60));

            //BubbleSorterExe.Sort(employees1, EmployeeExe.CompareYear);//    工资排序

            //BubbleSorter.Sort(employees1, Employee.CompareYear);//年龄排序

            BubbleSorterExe.Sort(employees1, EmployeeExe.CompareName);

            BubbleSorterExe.export(employees1, EmployeeExe.Print);

            foreach (var employee in employees1)//遍历
            {
                Console.WriteLine(employee);//输出
            }
        }
    }
}
